{% extends "base.html" %}

{% block title %}新建任务{% endblock %}

{% block content %}
<div class="form-header">
    <h2>新建任务</h2>
    <a href="{{ url_for('index') }}" class="back-btn">
        <i class="fas fa-arrow-left"></i> 返回
    </a>
</div>

<form class="todo-form" method="POST" action="{{ url_for('create_todo') }}">
    <div class="form-group">
        <label for="title">标题 *</label>
        <input type="text" id="title" name="title" required placeholder="输入任务标题">
    </div>
    
    <div class="form-group">
        <label for="description">描述</label>
        <textarea id="description" name="description" rows="4" placeholder="输入任务描述（可选）"></textarea>
    </div>
    
    <div class="form-group checkbox-group">
        <input type="checkbox" id="completed" name="completed">
        <label for="completed">标记为已完成</label>
    </div>
    
    <div class="form-actions">
        <button type="button" class="btn btn-secondary" onclick="history.back()">取消</button>
        <button type="submit" class="btn btn-primary">
            <i class="fas fa-plus"></i> 创建任务
        </button>
    </div>
</form>
{% endblock %}